﻿using Microsoft.Owin.Hosting;
using System;
using System.Net.Http;
using System.Configuration;
namespace CmdHost
{
    class Program
    {
        private static readonly string hosturl = ConfigurationManager.AppSettings["hosturl"];
        static void Main(string[] args)
        {
            string baseAddress = hosturl;
            WebApp.Start<Startup>(url: baseAddress);
            //// Start OWIN host 
            //using (WebApp.Start<Startup>(url: baseAddress))
            //{
            //    HttpClient client = new HttpClient();
            //    var response = client.GetAsync(baseAddress + "api/Test").Result;
            //    Console.WriteLine(response);
            //    Console.WriteLine(response.Content.ReadAsStringAsync().Result);
            //}
            Console.WriteLine("服务启动："+baseAddress);
            Console.ReadLine();
        }
    }
}
